home *** CD-ROM | disk | FTP | other *** search
- Path: scet.org.uk!user
- From: Internet@scet.org.uk (Internet)
- Newsgroups: comp.lang.c
- Subject: None
- Date: Fri, 19 Jan 96 17:53:14 -0000
- Organization: SCET
- Message-ID: <-1390048502.ensmtp@scet.org.uk>
- NNTP-Posting-Host: 193.123.133.24
- X-Newsreader: ExpressNet/SMTP v1.1.5
-
- From: schlein@umbc.edu (Jonas J. Schlein)
- Newsgroups: comp.lang.c
- Subject: Re: What the hell is THIS?!
- Date: 13 Jan 1996 00:33:18 -0500
- Organization: University of Maryland Baltimore County
- Lines: 32
- Message-ID: <4d7g6u$j0l@umbc9.umbc.edu>
- References: <4d6rgh$rfu@abel.cc.sunysb.edu>
- NNTP-Posting-Host: f-umbc9.umbc.edu
- NNTP-Posting-User: schlein
-
- Bommasamudram Madhusudan <bmadhusu@engws12.ic.sunysb.edu> wrote:
- |> hi guys;
- |>
- |> I'm going nuts trying to figure this out;
- |>
- |> Can someone explain what
- |>
- |> int (*p)[3] is?????
- |>
- |> Is this an array of pointers to integers
- |>
- |> OR
- |>
- |> a pointer to an array of integers?? HELP!
-
- According to cdecl:
-
- cdecl> explain int (*p)[3]
- declare p as pointer to array 3 of int
-
- |> I can say things like:
- |>
- |> (*p)[0] = 3; for e.g, but when I print the value using:
- |>
- |> printf("%d",(*p)[0]) I get a core dump!
-
- Exactly...Because it is a pointer, you need to associate some space
- with it via malloc() or the like.
- --
- "If it wasn't for C, we would be using BASI, PASAL, and OBOL."
-
- Jonas J. Schlein (schlein@gl.umbc.edu)
-
-
- -=-=-=-=-=-=-=-=-=-=-=-=-=-= RFC850 Headers Follow
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-
- X-ENSMTPGroup: comp.lang.c
- 220 93573 <4d7g6u$j0l@umbc9.umbc.edu> article
- Path:
- uknet!uknet!peer-news.britain.eu.net!EU.net!newsfeed.internetmci.com!howland.re
- ston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!freenet.columbus.oh
- us!magnus.acs.ohio-state.edu!lerc.nasa.gov!purdue!haven.umd.edu!news.umbc.edu!
- not-for-mail
-
-
- --
-
- _/_/_/ _/_/_/ _/_/_/ _/_/_/ | Tel: (0141) 337 5000
- _/ _/ _/ _/ | Fax: (0141) 337 5050
- _/_/_/ _/ _/_/ _/ | Net: scet@scet.org.uk
- _/ _/ _/ _/ | AppleLink: SCET.DEV
- _/_/_/ _/_/_/ _/_/_/ _/ |
- ......learning through technology |
-